<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数据分配</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link href="__PUBLIC__/css/layui.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/admin.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/public.css" rel="stylesheet" type="text/css"/>
	
</head>
<body>
<div class="layui-conter">
    <div class="layui-col-md12">
        <div class="navigation">
            <span>教务></span><span>数据分配</span>
        </div>

        <div class="white-conter">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body addPadding">
                        <form class="layui-form" action="{:U('Datasetting/DataAllocation')}" method="post" lay-filter="component-form-group">
														<div class=" layui-row" style="margin-top: 20px">
                                <div class=" layui-col-xs3" style="width: 350px;">
                                    <label class="layui-form-label">咨询顾问：</label>
                                    <div class="layui-input-block">
                                        <select name="scid">
																					<foreach name="sc_user" item="s">
                                            <option value="{$s.id}" <if condition="$s['id'] eq $scid">selected="selected"</if>>{$s.name}</option>
																					</foreach>
                                        </select>
                                    </div>
                                </div>
																<div class=" layui-col-xs3" style="width: 350px;">
																		<label class="layui-form-label">来源渠道：</label>
																		<div class="layui-input-block">
																				<select name="am_id">
																					<option value="">请选择</option>
																					<foreach name="all_am" item="s">
																						<option value="{$s.id}" <if condition="$s['id'] eq $am_id">selected="selected"</if>>{$s.name}</option>
																					</foreach>
																				</select>
																		</div>
																</div>
																<div class=" layui-col-xs5">
																		<label class="layui-form-label">联系手机：</label>
																		<div class="layui-input-block">
																				<input type="text" name="phone" value="{$phone}" class="layui-input">
																		</div>
																</div>
																<div class=" layui-col-xs5">
																		<label class="layui-form-label">出生年月：</label>
																		<div class="layui-input-block">
																				<input type="text" value="{$birth_date}" name="birth_date" id="data" lay-verify="date" placeholder="请选择"  class="layui-input">
																		</div>
																</div>
																<div class=" layui-col-xs5">
																		<label class="layui-form-label">就读学校：</label>
																		<div class="layui-input-block">
																				<input type="text" name="school" value="{$school}" class="layui-input">
																		</div>
																</div>
																<div class=" layui-col-xs3" style="width: 350px;">
																		<label class="layui-form-label">重点情况：</label>
																		<div class="layui-input-block">
																				<select name="akey_id">
																					<option value="">请选择</option>
																					<foreach name="akey" item="a" key="k">
																						<option value="{$k}" <if condition="$k eq $akey_id">selected="selected"</if>>{$a}</option>
																					</foreach>
																				</select>
																		</div>
																</div>
																<div class=" layui-col-xs5">
																		<label class="layui-form-label">回访信息：</label>
																		<div class="layui-input-block">
																				<input type="text" name="content" value="{$content}" class="layui-input">
																		</div>
																</div>
																<button class="layui-btn layui-btn-sm layui-btn-normal" style="margin-left: 20px;">搜索</button>
                            </div>
														</form>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-card">
											<form class="layui-form" action="{:U('Datasetting/studentadd')}" method="post" lay-filter="component-form-group">
											<div class="layui-row" style="margin-top: 20px">
													<div class="layui-col-xs3" style="width: 350px;">
															<label class="layui-form-label">分配对象：</label>
														<div class="list_con layui-input-block">
															<select name="xsid" lay-verify="required">
															<option value="">请选择</option>
																<foreach name="sc_user" item="s">
																	<if condition="!in_array($s['pwdid'],[3])">
																	<option value="{$s.id}">{$s.name}</option>
																	</if>
																</foreach>
															</select>
														</div>
													</div>
													<button class="layui-btn layui-btn-sm layui-btn-normal" style="margin-left: 20px;">分配</button>
											</div>
                        <div class="layui-card-body"  style="border-bottom:none;">
                            <table  class="layui-hide" id="test-table-operate" lay-filter="test-table-operate"></table>
                            <div class="layui-form layui-border-box layui-table-view" lay-filter="LAY-table-1">
                                <div class="layui-table-box" style="margin-bottom: 20px">
																	
                                    <div class="layui-table-body layui-table-main layui-col-md10">
                                        <table cellspacing="0" cellpadding="0" border="0" class="layui-table">
                                            <thead>
                                            <tr>
																									<th data-field="0" data-unresize="true">
																										<div class="layui-table-cell laytable-cell-1-0 laytable-cell-checkbox">
																											<input type="checkbox" name="0" class="all" lay-skin="primary" lay-filter="allChoose"/>
																										</div>
																									</th>
                                                <th data-field="Employee_name">
                                                    <div class="layui-table-cell laytable-cell-Employee_name" align="center">
                                                        <span>客户名称</span>
                                                    </div>
																								</th>
																								<th data-field="Employee_name">
																										<div class="layui-table-cell laytable-cell-Employee_name" align="center">
																												<span>就读学校</span>
																										</div>
																								</th>
																								<th data-field="d-start">
                                                    <div class="layui-table-cell laytable-cell-d-start" align="center">
                                                        <span>导入日期</span>
                                                    </div>
                                                </th>
																								
																								<th data-field="d-start">
																										<div class="layui-table-cell laytable-cell-d-start" align="center">
																												<span>出生日期</span>
																										</div>
																								</th>
                                                <th data-field="potential_num">
                                                    <div class="layui-table-cell laytable-cell-potential_num" align="center">
                                                        <span>渠道来源</span>
                                                    </div>
                                                </th>
                                                <th data-field="school_area">
                                                    <div class="layui-table-cell laytable-cell-school_area" align="center">
                                                        <span>所在校区</span>
                                                    </div>
                                                </th>
																								<th data-field="Work_number">
																										<div class="layui-table-cell laytable-cell-Work_number">
																												<span>回访信息</span>
																										</div>
																								</th>
                                            </tr>
                                            </thead>
                                            <tbody>
																						<foreach name="sc_data" item="s" key="k">
                                            <tr data-index="0" class="">
                                                <td data-field="0">
                                                    <div class="layui-table-cell laytable-cell-1-0 laytable-cell-checkbox">
                                                        <input type="checkbox" name="all[]" value="{$s.id}" lay-skin="primary"/>
                                                    </div>
                                                </td>
                                                <td data-field="Employee_name" align="center">
                                                	<div class="layui-table-cell laytable-cell-Employee_name">
																											<img class="user_icon" src="__PUBLIC__/images/user.png" width="30px" height="30px">
																											<span class="user_name">{$s.name}</span>
																										</div>
                                                </td>
																								<td data-field="Employee_name" align="center">
																									<div class="layui-table-cell laytable-cell-Employee_name">
																											<span class="user_name">{$s.school}</span>
																										</div>
																								</td>
                                                <td data-field="d-start" align="center">
                                                    <div class="layui-table-cell laytable-cell-d-start">{$s.news_time}</div>
                                                </td>
																								<td data-field="d-start" align="center">
																										<div class="layui-table-cell laytable-cell-d-start">{$s.birth_date}</div>
																								</td>
                                                <td data-field="potential_num" align="center">
                                                	<div class="layui-table-cell laytable-cell-potential_num">{$s.am_name}</div>
                                                </td>
                                                <td data-field="school_area" align="center">
                                                	<div class="layui-table-cell laytable-cell-school_area">{$s.x_name}</div>
                                                </td>
																								<td data-field="Work_number" align="center">
																									<div class="layui-table-cell laytable-cell-Work_number">{$s.record_data.content}</div>
																								</td>
                                            </tr>
																						</foreach>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
												</form>
                    </div>
                </div>
            </div>
        </div>


    </div>
</div>
</body>
<script src="__PUBLIC__/js/layui.all.js"></script>
<script src="__PUBLIC__/js/jquery.js"></script>

<script>
    layui.use( ['form','layer','laydate','element'], function(){
        var  form = layui.form
            , $ = layui.jquery
            ,layer = layui.layer
            ,element = layui.element
            , laydate = layui.laydate;
        //触发事件
            laydate.render({
                elem: '#startTime'
            });
						laydate.render({
							elem: '#endTime' //截止时间
						});
						//列表 
						laydate.render({
							elem: '#list_start_time' //起始时间
						});
						laydate.render({
							elem: '#list_end_time' //截止时间
						});
				//全选
				form.on('checkbox(allChoose)', function(data){
            var child = $(data.elem).parents(".layui-col-md10").find('input[type="checkbox"]');
						child.each(function(index, item){
							item.checked = data.elem.checked;
						});
						form.render('checkbox');
				});
				form.render();
    });
</script>
</html>